import {request} from './request.js'
export function getHomem (page,flag=0) {
	return request({
		url:'/api/getArticles'+'?page='+page+'&'+'flag='+flag
	})
}
export function getUsers(loginname) {
	return request({
		url: '/api/Userinfo/get/'+ loginname,
	})
}

export function toLookfor (lookfor,state='已发布',isLogin=false,token=''){
	let url=''
	if(isLogin==false)
		url='/api/get/msg'
	else
		url='/my/lookfor/get/msg'
	return request({
		url:url,
		params:{
			lookfor:lookfor,
			state:state,
			isLogin:isLogin
		},
		headers: {
		        'Content-Type': 'application/x-www-form-urlencoded',
				'Authorization': token
		}
	})
}